// By Robalo / TPWCAS

//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "aisuppress\fn_filterObjects.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_type","_z"];
if (_this isKindOf "Man") exitWith {false};
if (_this isKindOf "Bird") exitWith {false};
if (_this isKindOf "BulletCore") exitWith {false};
if (_this isKindOf "Grenade") exitWith {false};
if (_this isKindOf "WeaponHolder") exitWith {false};
if (_this isKindOf "WeaponHolderSimulated") exitWith {false};
if (_this isKindOf "StaticWeapon") exitWith {false};
if (["fence", (format ["%1", _this])] call BIS_fnc_inString) exitWith {false};
if ([": b_", (format ["%1", _this])] call BIS_fnc_inString) exitWith {false};
if ([": t_", (format ["%1", _this])] call BIS_fnc_inString) exitWith {false};
// Filter all objets starting with "#"
if ((toArray(format ["%1", _this])) select 0 == 23) exitWith {false};
if (["slop", (format ["%1", _this])] call BIS_fnc_inString) exitWith {false};
if (["rater", (format ["%1", _this])] call BIS_fnc_inString) exitWith {false};
_type = typeOf _this;
if (_type == "") then 
{
	if (damage _this == 1) exitWith {false};
};
// else 
// {
	// //if (_type in ["#crater","#crateronvehicle","#soundonvehicle","#particlesource","#lightpoint","#slop","#mark"]) exitWith {false};
	// if (_type in ["#soundonvehicle","#particlesource","#lightpoint","#mark"]) exitWith {false};
// };

_z = (getPosATL _this) select 2;
//if (_z > 0.3) exitWith {false};
if (_z > 1) exitWith {false};
TRACE("End");
TMFPROFILERSTOP;
true